#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

protected:
    void paintEvent(QPaintEvent *event) override;


private:
    Ui::Widget *ui;
    QTimer* timer;
    int currentValue;
    int mark = 0;
    int startAngle;
    double angle = 240.0 / 60;
    void initCanvas(QPainter& painter);
    void drawMiddleCircle(QPainter& painter, int r);
    void drawCurrntSpeed(QPainter& painter);
    void drawScale(QPainter& painter, int r);
    void drawScaleDate(QPainter& painter);
    void drawPointLine(QPainter& painter, int len);
    void drawSpeedPiw(QPainter& painter, int r);
    void drawElliInnerBlack(QPainter& painter, int r);
    void startSpeed();
    void drawElliInnerShine(QPainter& painter, int r);
    void drawOutShine(QPainter& painter, int r);
    void drawLogo(QPainter& painter, int r);
};
#endif // WIDGET_H
